package com.example.videoweb.service.impl;

import com.example.videoweb.dao.PraiseMapper;
import com.example.videoweb.domain.Praise;
import com.example.videoweb.service.PraiseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PraiseServiceImpl implements PraiseService {

    @Autowired
    private PraiseMapper praiseMapper;

    @Override
    public boolean insert(Praise praise) {
        return praiseMapper.insert(praise) > 0;
    }

    @Override
    public boolean update(Praise praise) {
        return praiseMapper.update(praise) > 0;
    }

    @Override
    public Praise selectByPrimaryKey(Integer id) {
        return praiseMapper.selectByPrimaryKey(id);
    }
}
